<?php

	require('../_inc/inc.php');
	header('Content-Type: text/html; charset=' . $html['charset']);
	
	require('./class/u.php');
	require('./class/a.php');
	require('./class/c.php');

	//$DB =& E::$DB;
	$tpl =& A::$tpl;

	$body = array();
	$tpl->assign_by_ref('body', $body);


	$html['url'] = '?mod=' . $_GET['mod'] . '&fun=' . $_GET['fun'];


	if( ! include('../_mod/' . $_GET['mod'] . '/' . $_GET['fun'] . '.php') ){
		print_r($_GET); die;
	}


	$tpl->assign('P', $P);
	$tpl->assign('G', $G);
	$tpl->assign('L', $L);


	$tpl->assign('_tpl_main_page', 
		B_DIR . '/_mod/' . $_GET['mod'] . '/' . $_GET['fun'] . '.tpl.' .
		($_GET['act'] === 'edit' ? 'add': $_GET['act']) . '.htm');


	$tpl->display( B_DIR . '/_admin/src/_index.htm');
	
?>